package com.weixin.paleituo.rxjava;


import com.weixin.paleituo.bean.AboutUsBean;
import com.weixin.paleituo.bean.AddShopBean;
import com.weixin.paleituo.bean.AfterSaleRequestBean;
import com.weixin.paleituo.bean.AppoinmentBean;
import com.weixin.paleituo.bean.AreaInfoBean;
import com.weixin.paleituo.bean.AttentionStoreBean;
import com.weixin.paleituo.bean.BrokerageBean;
import com.weixin.paleituo.bean.BuyHouseStepBean;
import com.weixin.paleituo.bean.BuyHuseBean;
import com.weixin.paleituo.bean.ChildrenBeanX;
import com.weixin.paleituo.bean.CityHouseBean;
import com.weixin.paleituo.bean.CityListBean;
import com.weixin.paleituo.bean.ClassifyBean;
import com.weixin.paleituo.bean.ClassifyGoodsListBean;
import com.weixin.paleituo.bean.CouponsBean;
import com.weixin.paleituo.bean.CouponsClassifyBean;
import com.weixin.paleituo.bean.CouponsTipsBean;
import com.weixin.paleituo.bean.CreateOrderBody;
import com.weixin.paleituo.bean.ExpressBean;
import com.weixin.paleituo.bean.FirstOrderListBean;
import com.weixin.paleituo.bean.GetUpBuyHouseBean;
import com.weixin.paleituo.bean.Goods;
import com.weixin.paleituo.bean.GoodsDetailsBean;
import com.weixin.paleituo.bean.GoodsMoreBean;
import com.weixin.paleituo.bean.GoodsOrderBean;
import com.weixin.paleituo.bean.GoodsShopHomeBean;
import com.weixin.paleituo.bean.HomeBean;
import com.weixin.paleituo.bean.HomeHouseBean;
import com.weixin.paleituo.bean.HomeRecommandBean;
import com.weixin.paleituo.bean.HotStoreGoods;
import com.weixin.paleituo.bean.HouseDetailBean;
import com.weixin.paleituo.bean.HouseListBean;
import com.weixin.paleituo.bean.HouseSaleStateBean;
import com.weixin.paleituo.bean.HousesListBean;
import com.weixin.paleituo.bean.InvoiceTipsBean;
import com.weixin.paleituo.bean.LotterBuyHouseBean;
import com.weixin.paleituo.bean.MessageBean;
import com.weixin.paleituo.bean.ModifyShopCartNumberBean;
import com.weixin.paleituo.bean.MyBrokerageBean;
import com.weixin.paleituo.bean.MyHouseBean;
import com.weixin.paleituo.bean.NoticeMessageBean;
import com.weixin.paleituo.bean.OrderBean;
import com.weixin.paleituo.bean.OrderCreatedBean;
import com.weixin.paleituo.bean.OrderDetailsBean;
import com.weixin.paleituo.bean.OrderGoods;
import com.weixin.paleituo.bean.OrderInvoiceBean;
import com.weixin.paleituo.bean.PayForSuccessBean;
import com.weixin.paleituo.bean.PreLookHouseBean;
import com.weixin.paleituo.bean.PtListBean;
import com.weixin.paleituo.bean.ReFundBean;
import com.weixin.paleituo.bean.RegisterProBean;
import com.weixin.paleituo.bean.SelectAttrBean;
import com.weixin.paleituo.bean.SharedCreateOrderBody;
import com.weixin.paleituo.bean.SharedHouseBean;
import com.weixin.paleituo.bean.ShippingAddressBean;
import com.weixin.paleituo.bean.ShopCarBean;
import com.weixin.paleituo.bean.StatusCode;
import com.weixin.paleituo.bean.StoreGoodBean;
import com.weixin.paleituo.bean.SumBrokerageBean;
import com.weixin.paleituo.bean.TemplateDetailsBean;
import com.weixin.paleituo.bean.TimeBean;
import com.weixin.paleituo.bean.UnitsBean;
import com.weixin.paleituo.bean.UpTokenBean;
import com.weixin.paleituo.bean.UpdateInfoBean;
import com.weixin.paleituo.bean.UseMyHomeBean;
import com.weixin.paleituo.bean.UserInfoBean;
import com.weixin.paleituo.bean.UserMyHomeListBean;
import com.weixin.paleituo.bean.VersionBean;
import com.weixin.paleituo.bean.VisterRecordBean;
import com.weixin.paleituo.bean.WeiChatPayBean;
import com.weixin.paleituo.bean.WelcomeImgsBean;
import com.weixin.paleituo.bean.WithdrawAccountBean;
import com.weixin.paleituo.bean.WordOfMouthBean;

import java.util.List;

import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.POST;
import retrofit2.http.Query;
/**
 * Author yichao
 * Time  2018/1/17 9:33
 * Dest  访问网络的方法
 *
 */
public interface Api {
    boolean isRelease=false;
    /**发布地址*/
    String baseUrl="http://120.79.136.125/";
    /**测试地址*/
    // String testBaseUrl="http://h197353r77.iask.in/";
   //String testBaseUrl="http://116.62.115.91/";
    //String testBaseUrl="http://120.79.136.125/";
   //String testBaseUrl="http://192.168.0.133/";
    String testBaseUrl="http://192.168.2.110/";
    //String testBaseUrl="http://tfinoray.xicp.io/";  appNews·
    /**登录*/
    @POST("shushe/msmLogin/login/v2")
    Observable<StatusCode<UserInfoBean>> login(@Query("username") String username, @Query("password") String password,@Query("deviceNum") String deviceNum);
    /**发送验证码*/
    @POST("shushe/memUser/sendCode/v2")
    Observable<StatusCode<String>> sendMsgCode(@Query("username") String username,@Query("smssign") String smssign);
    /**注册*/
    @POST("shushe/memUser/register.do/v2")
    Observable<StatusCode<String>> register(@Query("username") String username,@Query("password") String password,@Query("smscode") String smsCode);
    /**忘记密码*/
    @POST("shushe/memUser/update/v2")
    Observable<StatusCode<String>> forgetPassword(@Query("username")String username,@Query("password") String password,@Query("smscode") String smsCode);
    /**退出登录*/
    @POST("shushe/msmLogin/logout/app")
    Observable<StatusCode<String>> exitLogin(@Query("token") String token,@Query("userId") String userId);
    /**楼盘列表*/
    @POST("shushe/house/applisthouses")
    Observable<StatusCode<List<HouseListBean>>> getHouseList(@Query("areaId") String city, @Query("rows") int rows, @Query("page")String page );
    /**楼盘详情*/
    @POST("shushe/house/appfinddetails")
    Observable<StatusCode<HouseDetailBean>> getHouseDetails(@Query("id") String id);
    /**获取城市*/
    @POST("shushe/area/getarea")
    Observable<StatusCode<List<CityListBean>>> getCity(@Query("token") String  toke);
    /**获取楼盘售卖情况*/
    @POST("shushe/house/findhousesbyid")
    Observable<StatusCode<HouseSaleStateBean>> getHouseSaleState(@Query("id") String houseid);
    /**获取楼层单元*/
    @POST("shushe/units/findunitbybuildingid")
    Observable<StatusCode<List<UnitsBean>>> getHouseUnit(@Query("buildingId") String buildingId);
    /**支付宝获取订单*//*
    @POST("shushe/pay/alipay")
    Observable<StatusCode<String>> getOderInfo(@Query("houseId" )String houseid);*/
    /**获取7牛上传图片token*/
    @POST("shushe/qiniu/getapp/uptoken/app")
    Observable<StatusCode<UpTokenBean>> getQiuniToken(@Query("token")String toke, @Query("userId") String userid);
    /**更改个人信息*/
    @POST("shushe/memUser/save/personaldate/app")
    Observable<StatusCode<UpdateInfoBean>> updatePersonInfo(@Query("token") String token, @Query("userId") String userId, @Query("nickname") String nickname, @Query("sex") String sex, @Query("signature") String signature, @Query("imgurl") String imgurl);
    /**创建订单  */
    @POST("shushe/room/placeorder/app")
    Observable<StatusCode<OrderBean>> createOrder(@Query("id") String id,@Query("roomId") String roomId,@Query("userId") String userId,@Query("type") String type,@Query("token")String token);
    /**看房到访记录*/
    @POST("shushe/customer/app/user/visitors/app")
    Observable<StatusCode<List<VisterRecordBean>>> getVisterRecord(@Query("token") String toke, @Query("userId") String userid, @Query("username") String  phone);
    /**付款成功*/
     /**
      *getallchosenads.htm
      * @param roomId
      * @param deposit
      * @param orderId
      * @param payType  1支付宝 2 微信 3 线下
      * @return
      */
    @POST("shushe/pay/payments")
    Observable<StatusCode<PayForSuccessBean>> payforSuccess(@Query("roomId") String roomId, @Query("deposit") String deposit, @Query("orderId") String orderId,@Query("payType") String payType);
    /**购房清单列表*/
   @POST("shushe/purchase/listpurchase/app")
   Observable<StatusCode<List<BuyHuseBean>>> getBuyHouseList(@Query("userId") String userId, @Query("rows")int rows, @Query("page")String page,@Query("token")String token);
   /**购房流程*/
   @POST("shushe/purchase/onepurchase/app")
   Observable<StatusCode<BuyHouseStepBean>> getBuyHouseDetails(@Query("id") String id,@Query("phone") String phone,@Query("userId")String userId,@Query("token")String token);
    /**消息列表*/
    @POST("shushe/message/applistmessage/app")
   Observable<StatusCode<List<MessageBean>>> getMessageList(@Query("userId") String userId, @Query("rows")int rows, @Query("page")String page,@Query("token")String token);
    /**删除消息*/
    @POST("shushe/message/hidemessage")
    Observable<StatusCode<String>> deleteMessage(@Query("id") String id);
    /**获取优惠券的类型*/
    @POST("shushe/category/getappcategory")
    Observable<StatusCode<List<CouponsClassifyBean>>> getCouponsClassifyList(@Query("token")String token);
    /**获取优惠券*/
    @POST("shushe/coupon/user/coupon/app")
    Observable<StatusCode<List<CouponsBean>>> getCouponsList(@Query("token")String token, @Query("userId") String userId, @Query("state") int state, @Query("typeId") String typeId);
    /**获取摇号买房的列表*/
    @POST("shushe/rockhouses/getRockHouses/app")
    Observable<StatusCode<List<LotterBuyHouseBean>>>getLotterBuyHouseList(@Query("phone") String username,@Query("housesId") String housesId,@Query("token")String toke,@Query("userId")String userId);
    /**检查版本*/
    @POST("shushe/version/check")
   Observable<StatusCode<VersionBean>> checkVersion(@Query("curVer") String curVer);

   // @POST("/version/export") loadVerVsion(@Query("id")String id);
    /**获取首页数据*/
    @POST("shushe/advertising/getarecommendhouse")
    Observable<StatusCode<HomeBean>> getHomeData(@Query("token")String toke);
    /**获取商品分类列表*/
   @POST("shushe/category/getall")
    Observable<StatusCode<List<ClassifyBean>>> getGoodsClassify(@Query("token")String toke,@Query("userId")String userId);
        /**获取商品*/
   @POST("shushe/category/getchildren")
   Observable<StatusCode<List<ChildrenBeanX>>> getCategoryDetails(@Query("categoryid")String categoryid);
    /**微信支付*/
   @POST("shushe/pay/wechat/app")
   Observable<StatusCode<WeiChatPayBean>> getWeChatPayOrder(@Query("houseId")String houseId, @Query("deposit")String deposit, @Query("orderId")String orderId, @Query("fullname")String fullname, @Query("type") int type, @Query("userId")String userId,@Query("token")String token);
    /**支付宝支付*/
   @POST("shushe/pay/alipay/app")
    Observable<StatusCode<String>> getAlipay(@Query("houseId")String houseId,@Query("deposit")String deposit,@Query("orderId")String orderId,@Query("fullname")String fullname,@Query("type") int type, @Query("userId")String userId,@Query("token")String token);
   /**得到城市楼盘*/
    @POST("shushe/house/city/allhouses")
    Observable<StatusCode<List<CityHouseBean>>> getCityHouseLocation(@Query("token")String token,@Query("city")String city);
    /**获取城市楼盘*/
    @POST("shushe/house/arealisthouses")
    Observable<StatusCode<List<HomeHouseBean>>>getCityHouseList(@Query("token")String token );
    /**获取分类商品*/
    @POST("shushe/product/listGoods")
    Observable<StatusCode<ClassifyGoodsListBean>>getClassifyGoodsLsit(@Query("gcId")String gcId,@Query("brandList")List<Integer> brandList,@Query("numAsc")String numAsc,@Query("priceAsc")String priceAsc
    ,@Query("token")String token,@Query("rows")int rows,@Query("page")int page,@Query("userId")String userId,@Query("specialSalesType")String specialSalesType,@Query("goodsName")String goodsName);
    /**退款*/
    @POST("shushe/purchase/findOneRefund/app")
    Observable<StatusCode<ReFundBean>>getRefundDetails(@Query("orderId")long orderId,@Query("token")String token,@Query("userId")String userId);
    /**放弃购房*/
    @POST("/shushe/rockhouses/app/user/giveup/app")
    Observable<StatusCode<List<GetUpBuyHouseBean>>> getUpBuyHouse(@Query("token")String token, @Query("userId")String userId, @Query("username")String username);
    /**商品详情*/
    @POST("shushe/product/goods")
    Observable<StatusCode<GoodsDetailsBean>>getGoodsDetails(@Query("userId")String userId,@Query("token")String token,@Query("id")String id);

    @POST("shushe/product/goodPrice")
    /**选择商品属性*/
    Observable<StatusCode<SelectAttrBean>> getGoodsAttr(@Query("id") int id, @Query("idlist") String idlist, @Query("token") String token,@Query("userId") String userId);
    /**商品首页*/
    @POST("appshop/getallchosenads.htm")
    Observable<StatusCode<GoodsShopHomeBean>>getgoodsShopHomeDate(@Query("token")String token);
    /**获取更多商品*/
    @POST("appshop/getonechosenad.htm")
    Observable<StatusCode<GoodsMoreBean>> getMoreShop(@Query("token")String token,@Query("goodsclassid")int goodsclassid);
    /**口碑旺铺列表*/
    @POST("appshop/getstores.htm")
    Observable<StatusCode<List<WordOfMouthBean>>> getWordOfMothList(@Query("Token")String token,@Query("page")int page,@Query("rows")int rows);
    /**商品列表*/
    @POST("shushe/product/getchosengoods")
    Observable<StatusCode<List<Goods>>> getGoodList(@Query("token")String token, @Query("classid")int classid,@Query("userId")String userId,@Query("page")int page,@Query("rows")int rows);
    /**获取购物车*/
    @POST("shushe/cart/goods_cart1_load")
    Observable<StatusCode<ShopCarBean>>getshopCarData(@Query("app_user_id")String app_user_id);
    /**修改购物车数量*/
    @POST("shushe/cart/goods_count_adjust")
    Observable<StatusCode<ModifyShopCartNumberBean>> modifiyShopCartNumber(@Query("gc_id")int gc_id, @Query("count")int number, @Query("gcs") String gcs);

    /**
     * 购物地址管理模块，添加收货地址
     *
     * @param isdefault 2:默认地址 1:非默认地址
     * @author fengzhen
     * @version v1.0, 2018/3/28
     */
    @POST("shushe/useraddress/add/app")
    Observable<StatusCode<ShippingAddressBean>> addShippingAddress(
            @Query("token") String token,
            @Query("userId") String userId,
            @Query("contact") String contact,
            @Query("phone") String phone,
            @Query("address") String address,
            @Query("provinsId") long provinsId,
            @Query("cityId") long cityId,
            @Query("districtId") long districtId,
            @Query("isdefault") String isdefault
    );
    /**
     * 购物地址管理模块，编辑收货地址
     *
     * @author fengzhen
     * @version v1.0, 2018/3/28
     */
    @POST("shushe/useraddress/update/app")
    Observable<StatusCode<ShippingAddressBean>> updateShippingAddress(
            @Query("token") String token,
            @Query("userId") String userId,
            @Query("id") int id,
            @Query("contact") String contact,
            @Query("phone") String phone,
            @Query("address") String address,
            @Query("provinsId") long provinsId,
            @Query("cityId") long cityId,
            @Query("districtId") long districtId,
            @Query("isdefault") String isdefault
    );

    /**
     * 购物车地址管理模块，地址列表查询
     *
     * @author fengzhen
     * @version v1.0, 2018/3/28
     */
    @POST("shushe/useraddress/getall/app")
    Observable<StatusCode<List<ShippingAddressBean>>> getShippingAddress(
            @Query("token") String token,
            @Query("userId") String userId
    );

    /**
     * 设置当前地址为默认地址
     *
     * @author fengzhen
     * @version v1.0, 2018/3/29
     */
    @POST("shushe/useraddress/isdefault/app")
    Observable<StatusCode<String>> setDefaultAddress(
            @Query("token") String token,
            @Query("userId") String userId,
            @Query("isdefault") int isdefault,
            @Query("id") int id
    );

    /**
     * 删除物流地址
     *
     * @author fengzhen
     * @version v1.0, 2018/3/29
     */
    @POST("shushe/useraddress/delete/app")
    Observable<StatusCode<String>> deleteShippingAddress(
            @Query("token") String token,
            @Query("userId") String userId,
            @Query("id") int id
    );

    /**
     * 购物地址管理模块
     * 地区三级联动
     *
     * @author fengzhen
     * @version v1.0, 2018/3/29
     */
    @POST("shushe/area/all/area/app")
    Observable<StatusCode<List<AreaInfoBean>>> getAddressInfo(
            @Query("token") String token,
            @Query("userId") String userId
    );
    /**删除购物车*/
    @POST("shushe/cart/remove_goods_cart")
    Observable<StatusCode<String>>deleteShopCart(@Query("ids")String ids);
    /**分类推荐*/
    @POST("shushe/product/getclassrecommendgoods")
    Observable<StatusCode<ChildrenBeanX>> getClassrecommentgoods(@Query("goodsclassid")String id,@Query("token")String token,@Query("page")int page,@Query("rows")int rows,@Query("userId")String userid);
    /**登录协议*/
    @POST("shushe/register/getprotocal")
    Observable<StatusCode<RegisterProBean>>getRegisterPro(@Query("token")String token);

    /*店铺首页*/
    @POST("shushe/store/detail")
    Observable<StatusCode<StoreGoodBean>>getStoreHomeDetails(@Query("token")String token,@Query("userId")String userId,@Query("storeId")int storeId);
    /**店铺的热销商品*/
    @POST("shushe/store/hotgoods")
    Observable<StatusCode<List<HotStoreGoods>>> getStoreHotgoods(@Query("token")String token,@Query("storeId")int storeId,@Query("rows")int rows,@Query("page")int page ,@Query("userId") String userId);

    /**店铺所有商品*/
    @POST("shushe/store/allgoods")
    Observable<StatusCode<List<HotStoreGoods>>> getStoreAllGoods(@Query("token")String token,@Query("hotsell")String hotsell,@Query("recommend")String recommend,@Query("price")String price,@Query("storeId")int storeId,@Query("page")int page,@Query("rows")int rows,@Query("userId")String  userId);
    /**关注店铺  关注传2取消传1*/
    @POST("shushe/memUser/addStore/app")
    Observable<StatusCode<AttentionStoreBean>> attentStroe(@Query("userId")String userId, @Query("storeId")int storeId, @Query("mark")String marl,@Query("token")String token);
    /**
     * 获取发票须知内容
     */
    @POST("shushe/invoice/notice//detail")
    Observable<StatusCode<InvoiceTipsBean>> getInvoiceTips(
            @Query("token") String token,
            @Query("userId") String userId
    );
    /**
     * 获取优惠券使用说明
     */
    @POST("shushe/couponinstruction/getappinstruction")
    Observable<StatusCode<CouponsTipsBean>> getCouponsTips(
            @Query("token") String token
    );

    /**
     * 查询增值税相关数据
     */
    @POST("shushe/vatinvoice/get/vat/invoice/app")
    Observable<StatusCode<OrderInvoiceBean>> getInvoiceGroupInfo(
            @Query("token") String token,
            @Query("userId") String userId
    );

    /**
     * 根据商品查询可用优惠券
     */
    @POST("shushe/coupon/user/notuse/app")
    Observable<StatusCode<List<CouponsBean>>> getCouponsForOrder(
            @Query("token") String token,
            @Query("userId") String userId,
            @Query("orderId") String orderId,
            @Query("goodsCouponMoney") String goodsCouponMoney
    );
    /**加入购物车*/
    @POST("shushe/cart/add_goods_cart")
    Observable<StatusCode<AddShopBean>> addShopCar(@Query("id")int GoodsId, @Query("count")int countnumber, @Query("user_id")String userId, @Query("gsp")String gsp);

    /**
     * 提交订单，创建订单
     */
    @POST("shushe/orderForGoods/add/obligation")
    Observable<StatusCode<OrderCreatedBean>> createGoodsOrder(
            @Body CreateOrderBody body
    );

    /**
     * 支付宝支付购物订单
     * @param couponIds 优惠券id拼接 例如：123-134-23
     */
    @POST("shushe/mallpay/alipay/app")
    Observable<StatusCode<String>> payGoodsOrderByAlipay(
            @Query("token") String token,
            @Query("userId") String userId,
            @Query("orderId") int orderId,
            @Query("couponIds") String couponIds
    );

    /**
     * 微信支付购物订单
     */
    @POST("shushe/mallpay/wechat/app")
    Observable<StatusCode<WeiChatPayBean>> payGoodsOrderByWechat(
            @Query("token") String token,
            @Query("userId") String userId,
            @Query("orderId") int orderId,
            @Query("couponIds") String couponIds
    );
    /**首页推荐*/
    @POST("shushe/product/getrecommendforugoods")
    Observable<StatusCode<List<HomeRecommandBean>>> getHomeRecommand(@Query("userId")String userId, @Query("token")String token, @Query("rows") int rows , @Query("page")int page);
    /**查询订单  订单状态1-待付款，2-待收货，4-已收货，5-已退款*/
    @POST("shushe/orderForGoods/details/app")
    Observable<StatusCode<List<GoodsOrderBean>>> getOrderList(@Query("token")String token,@Query("userId")String userId,@Query("orderStatus") String orderStatus,@Query("page")int page,@Query("rows")int row );

    /**
     * 查询订单详情
     * @param detailId 当查询的订单状态不为待付款（orderStatus=1）或者已取消（orderStatus=7）时，将详情订单id传过来
     */
    @POST("shushe/orderForGoods/single/details/app")
    Observable<StatusCode<OrderDetailsBean>> getOrderDetailsInfo(
            @Query("token") String token,
            @Query("userId") String userId,
            @Query("orderId") int orderId,
            @Query("detailId") String detailId
    );

    /**
     * 取消订单
     */
    @POST("shushe/orderForGoods/cancel/app")
    Observable<StatusCode<String>> cancelOrder(
            @Query("token") String token,
            @Query("userId") String userId,
            @Query("orderId") int orderId
    );

    /**
     * 删除订单(假删)
     *
     * @param sign 已取消订单传1，已完成订单传2
     */
    @POST("shushe/orderForGoods/delete/app")
    Observable<StatusCode<String>> deleteOrder(
            @Query("token") String token,
            @Query("userId") String userId,
            @Query("orderId") int orderId,
            @Query("sign") int sign
    );

    /**
     * orderDetailId	是	String	订单id
     token	是	String	Token
     userId	是	Long	userId

     * @return
     */
    @POST("shushe/detailsController/express/app")
    Observable<StatusCode<ExpressBean>> getExpressInfo(@Query("orderDetailId")String orderDetailId, @Query("token")String token, @Query("userId")String userId);

    /**
     * 确认收货
     */
    @POST("shushe/detailsController/updateStatus/app")
    Observable<StatusCode<Object>> getGoods(
            @Query("token") String token,
            @Query("userId") String userId,
            @Query("id") int id
    );

    /**
     * 保存增票资质
     */
    @POST("shushe/vatinvoice/vatInvoiceUpdate/app")
    Observable<StatusCode<Object>> saveCompanyAptitude(
            @Query("token") String token,
            @Query("userId") String userId,
            @Query("name") String name,
            @Query("number") String number,
            @Query("address") String address,
            @Query("phone") String phone,
            @Query("blank") String blank,
            @Query("account") String account
    );

            /*删除订单*/
    @POST("shushe/orderForGoods/delete/app")
 Observable<StatusCode<Object>>deleteOrders(@Query("token")String token,
                                           @Query("userId")String userId,@Query("orderId") String orderid,
                                           @Query("detailId")String detailId,@Query("sign")String sign);

    /**
     * 查看订单发票信息
     */
    @POST("shushe/invoice/selectInvoice/app")
    Observable<StatusCode<OrderInvoiceBean>> getOrderInvoice(
            @Query("token") String token,
            @Query("userId") String userId,
            @Query("orderId") int orderId
    );

    /**
     * 查看我的房产数据列表
     */
    @POST("shushe/order/userhouse")
    Observable<StatusCode<List<MyHouseBean>>> getMyHouses(
            @Query("token") String token,
            @Query("userId") String userId
    );

    /*首页消息*/
    @POST("shushe/news/appNews")
    Observable<StatusCode<List<NoticeMessageBean>>>getHomeMessage( @Query("token") String token);

    /**
     * 关于我们
     */
    @POST("shushe/aboutus/detail")
    Observable<StatusCode<List<AboutUsBean>>> getAboutUs(
            @Query("token") String token
    );

    /**
     * app引导页图片
     *
     * @param positioncode 这里传入3
     * @param token 游客token
     */
    @POST("shushe/advertising/getads")
    Observable<StatusCode<WelcomeImgsBean>> getWelcomeImgs(
            @Query("positioncode") String positioncode,
            @Query("token") String token
    );

    /**上传错误日志*/
    @POST("/shushe/applog/insert")
    Observable<StatusCode<String>>uploadErrLog(@Query("messges")String messges,@Query("type")int type);

    /**
     * 共享家首页数据获取
     *
     * @param token 默认Token
     * @author fengzhen
     * @version v1.0, 2018/4/23
     */
    @POST("shushe/prototype/room/area")
    Observable<StatusCode<List<SharedHouseBean>>> getSharedHomeInfo(
            @Query("token") String token
    );

    /**获取预约时间*/
    @POST("/shushe/visitor/visit/time")
    Observable<StatusCode<TimeBean>> getTime(@Query("token")String token);


    /**
     * 首页通过城市id查询共享家首页数据
     *
     * @param token 默认Token
     * @param areaId 城市id
     * @author fengzhen
     * @version v1.0, 2018/4/23
     */
    @POST("shushe/prototype/room/single/area")
    Observable<StatusCode<List<HousesListBean>>> getCityHouses(
            @Query("token") String token,
            @Query("areaId") long areaId
    );

    /**
     * 根据样板间id获取样板间详情
     *
     * @param token 默认Token
     * @param id 样板间id
     * @param userId 用户id
     * @author fengzhen
     * @version v1.0, 2018/4/23
     */
    @POST("shushe/prototype/room/single")
    Observable<StatusCode<TemplateDetailsBean>> getTemplateDetails(
            @Query("token") String token,
            @Query("id") long id,
            @Query("userId") String userId
    );

 /**提交预约看房*/
    @POST("shushe/visitor/add/app")
    Observable<StatusCode<Object>>submintLookhouse(@Query("token")String toke,
                                                   @Query("userId")String userId,
                                                   @Query("prototypeRoomId")long prototypeRoomId,
                                                   @Query("linkman")String linkman,
                                                   @Query("appointmentTime")String appointmentTime ,
                                                   @Query("housesId")int houseId,
                                                   @Query("fullname") String fullname,
                                                   @Query("housename")String housename


                                                   );

  /**精选风格列表*/
    @POST("shushe/product/getrecommendstylegoods")
    Observable<StatusCode<List<Goods>>>getchoiceStyleList(@Query("id")int id,@Query("userId") String userId
            ,@Query("token")String token, @Query("page")int page,@Query("rows")int row);

    /**
     * 获取更多样板间数据
     *
     * @param token 默认Token
     * @param id 样板间id
     * @param houseId 楼盘id
     * @author fengzhen
     * @version v1.0, 2018/4/23
     */
    @POST("shushe/prototype/room/allbyhouses")
    Observable<StatusCode<List<PtListBean>>> getMoreTemplate(
            @Query("token") String token,
            @Query("id") long id,
            @Query("houseId") int houseId
    );
   /**应用到我家列表*/
    @POST("shushe/product/applytomyhousegoods")
 Observable<StatusCode<List<UserMyHomeListBean>>> userMyhouseList(@Query("userId")String userId,
                                                                  @Query("prototyperoomid") int  prototyperoomid,
                                                                  @Query("token") String token);

    /**提交应用到我家*/
    @POST("shushe/applytomyhouse/batchadd")
   Observable<StatusCode<String>>submintUseMyHome(  @Body UseMyHomeBean body);


    /**
     * 获取应用到我家 样板间结算商品列表
     *
     * @author fengzhen
     * @version v1.0, 2018/4/23
     */
    @POST("shushe/applytomyhouse/getallbyuserid")
    Observable<StatusCode<List<OrderGoods>>> getTemplateOrderGoods(
            @Query("token") String token,
            @Query("userId") String userId
    );

    /**
     * 提交订单，创建订单
     */
    @POST("shushe/orderForGoods/shared/obligation")
    Observable<StatusCode<OrderCreatedBean>> createSharedGoodsOrder(
            @Body SharedCreateOrderBody body
    );
  /**判断是否已经预约看房*/
    @POST("shushe/visitor/check/app")
   Observable<StatusCode<PreLookHouseBean>>isPreLookHouseTime(@Query("token")String token,@Query("userId")String userId,@Query("prototypeRoomId") long prototypeRoomId);

    /**
     * 佣金列表流水查询
     *
     * @author fengzhen
     * @version v1.0, 2018/5/11
     */
    @POST("shushe/putforword/selectLog/app")
    Observable<StatusCode<SumBrokerageBean>> getSumBrokerage(
            @Query("token") String token,
            @Query("userId") String userId,
            @Query("phone") String phone,
            @Query("rows") int rows,
            @Query("page") int page
    );

    /**
     * 发放中佣金列表流水查询
     *
     * @author fengzhen
     * @version v1.0, 2018/5/11
     */
    @POST("shushe/putforword/selectByPhone/app")
    Observable<StatusCode<List<BrokerageBean>>> getWithdrawBrokerage(
            @Query("token") String token,
            @Query("userId") String userId,
            @Query("phone") String phone,
            @Query("rows") int rows,
            @Query("page") int page
    );

    /**
     * 已提现佣金列表流水查询
     *
     * @author fengzhen
     * @version v1.0, 2018/5/11
     */
    @POST("shushe/putforword/selectByPhoneTow/app")
    Observable<StatusCode<List<BrokerageBean>>> getWithdrawalBrokerage(
            @Query("token") String token,
            @Query("userId") String userId,
            @Query("phone") String phone,
            @Query("rows") int rows,
            @Query("page") int page
    );

    /**
     * 获取提现类型，帐号，金额信息
     *
     * @author fengzhen
     * @version v1.0, 2018/5/14
     */
    @POST("shushe/putforword/userAccount/app")
    Observable<StatusCode<WithdrawAccountBean>> getAccountForWithdraw(
            @Query("token") String token,
            @Query("userId") String userId,
            @Query("phone") String phone
    );

    /**
     * 提交提现申请
     *
     * @author fengzhen
     * @version v1.0, 2018/5/14
     */
    @POST("shushe/putforword/insertPutForword/app")
    Observable<StatusCode<WithdrawAccountBean>> commitWithdrawal(
            @Query("token") String token,
            @Query("userId") String userId,
            @Query("phone") String phone,
            @Query("paymentMethod") int paymentMethod,
            @Query("payeeRealName") String payeeRealName,
            @Query("payeeAccount") String payeeAccount,
            @Query("amountStr") String amountStr
    );

    /**
     * 查询佣金数据
     *
     * @author fengzhen
     * @version v1.0, 2018/5/14
     */
    @POST("shushe/putforword/commission/app")
    Observable<StatusCode<MyBrokerageBean>> refreshBrokerage(
            @Query("token") String token,
            @Query("userId") String userId,
            @Query("phone") String phone
    );



    /**
     * 获取预约
     * 	是	Long	状态1-已预约，2-已参观），3-已取消
     */
    @POST("shushe/visitor/visit/appointment/app")
    Observable<StatusCode<List<AppoinmentBean>>> getAppoinmentList(@Query("token")String token,
                                                                   @Query("userId")String userId,
                                                                   @Query("state" )int state,
                                                                   @Query("page") int page,
                                                                   @Query("rows")int rows);

    /**
     * 删除参观记录
     * @param token
     * @param userId
     * @param id
     */
    @POST("shushe/visitor/delete/app")
    Observable<StatusCode<String>>deleteAppoinment(@Query("token")String token,
                                                   @Query("userId")String userId,
                                                   @Query("id")long id);
    /**
     * 售后申请第一页
     */
    @POST("/shushe/serviceorder/gain/app")
    Observable<StatusCode<AfterSaleRequestBean>>getFirstAfterSaleRequest(@Query("token")String token, @Query("userId")String userId);

    /**
     * 售后申请第二页
     * @param token
     * @param userId
     * @param page
     * @param rows
     * @return
     */
    @POST("/shushe/serviceorder/follow/up/app")
    Observable<StatusCode<List<FirstOrderListBean>>>getSecondAfterSaleRequest(@Query("token")String token, @Query("userId")String userId, @Query("page")int page, @Query("rows")int rows);

 }


